package com.outstanding.his.inspect.dao.impl;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.outstanding.his.inspect.dao.IInspectDao;
import com.outstanding.his.inspect.domain.Inspect;

public class HibernateInspectDao extends HibernateDaoSupport implements
		IInspectDao {

	@Override
	public Inspect submitInspect(Inspect inspect) throws DataAccessException {
		this.getHibernateTemplate().saveOrUpdate(inspect);
		return inspect;
	}

	@Override
	public Inspect getInspect(Integer inspectId) throws DataAccessException {
		Inspect inspect = (Inspect) this.getSession().load(Inspect.class,
				inspectId);
		return inspect;
	}

}
